<%@page import="com.gym.model.entity.Customer"%>
<%@page import="com.gym.model.entity.User"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>dashboardCustomer</title>
</head>
<jsp:include page="/jsp/menu.jsp" />
<%
User user = (User)request.getSession().getAttribute("user");
Customer customer = (Customer) request.getSession().getAttribute("customer"); 

%>
<body>
<div style="float: left;" class="urbangreymenu">
	<h3 class="headerbar">AREA ADMIN</h3>
	<ul>
		<li><a href="recuperaCustomer.do">Modifica profilo</a> </li>
		<li><a href="vaiDeleteUser.do">Elimina account</a></li>
		
	</ul>
</div>
<div style="padding-top:12% ">
<table>
	<tr>
		<td style="color:  #003366;">Sei registrato con la userid:</td> <td><%=customer.getUser().getEmail()%></td>
		<td style="color:  #003366;"> Iscritto dal:</td> <td><%=customer.getIdate()%></td>
	</tr>
	<tr>
		<td style="color:  #003366;">Nominativo:</td> <td><%=customer.getFirstname()+" "+customer.getLastname()%></td>
		<td style="color:  #003366;"> Data di nascita:</td> <td><%=customer.getBdate()%></td>
	</tr>
	<tr>
		<td style="color:  #003366;">Codice Fiscale:</td> <td><%=customer.getFc()%></td>
		<td style="color:  #003366;"> Codice personale:</td> <td><%=customer.getCode()%></td>
	</tr>
	<tr>
		<td style="color:  #003366;">Telefono:</td> <td><%=(customer.getPhone()==null ? "N.D." : customer.getPhone())%></td>
	</tr>
		<tr>
		<td style="color:  #003366;">Sesso:</td> <td><%=customer.getGender()%></td>
	</tr>
	
<%if(user!=null && user.isCustomer()){%>
	<tr>
		<td style="color:  #003366;">Scadenza certificato medico:</td> 
		<td ><%=(customer.getCdatexpiry()==null ? "devi portare il certificato!" : customer.getCdatexpiry())%></td>
	</tr>
<%}%>
</table>
</div>



</body>

</html>